<?php
	session_start();
	require_once("../classes/database.class.php");
	require_once("../includes/define.php");
		
	$bd = new Database(MYSQL_DB_HOST,MYSQL_DB_LOGIN,MYSQL_DB_PASSWORD,MYSQL_DB_NAME);
	$bd->connect();
	/*foreach($_SESSION['colorAnswers'] as $answer){
		$bd->query("INSERT INTO colorAnswers (participantSessionId,leftColorName, rightColorName, shapeName, chosenColorName, time) VALUES ('".$_SESSION['participantSessionId']."', '".$answer['leftColorName']."', '".$answer['rightColorName']."', '".$answer['shapeName']."', '".$answer['chosenColorName']."', '".$answer['time']."');");
	}
	$_SESSION['colorAnswers'] = NULL;*/
	$_SESSION['color']="ok";
	echo "UPDATE participantsSessions SET isFinished = '1' WHERE participantSessionId = '".$_SESSION['participantSessionId']."';";
	$bd->query("UPDATE participantsSessions SET isFinished = '1' WHERE participantSessionId = '".$_SESSION['participantSessionId']."';");
	$bd->close();
?>